/*
 * Copyright 2021 Shulie Technology, Co.Ltd
 * Email: shulie@shulie.io
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.pamirs.tro.entity.dao.assist.loaddata;

import java.util.List;
import java.util.Map;

import com.pamirs.tro.entity.domain.entity.TReturnData;
import com.pamirs.tro.entity.domain.vo.TReturnDataVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface TReturnDataDao {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table t_return_data
     *
     * @mbggenerated
     */
    int deleteByPrimaryKey(Long trdId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table t_return_data
     *
     * @mbggenerated
     */
    int insert(TReturnData record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table t_return_data
     *
     * @mbggenerated
     */
    int insertSelective(TReturnData record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table t_return_data
     *
     * @mbggenerated
     */
    TReturnData selectByPrimaryKey(Long trdId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table t_return_data
     *
     * @mbggenerated
     */
    int updateByPrimaryKeySelective(TReturnData record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table t_return_data
     *
     * @mbggenerated
     */
    int updateByPrimaryKey(TReturnData record);

    /**
     * 查询是否存在  相同技术链路id 或者 相同 startClass的 抽数配置
     *
     * @param incJarConfigVo
     * @return
     */
    List<TReturnDataVo> queryJarNameAndStartClass(TReturnDataVo incJarConfigVo);

    /**
     * 获取抽数配置分页
     *
     * @param paramMap
     * @return
     */
    List<TReturnDataVo> queryReturnDataPage(Map<String, Object> paramMap);

    /**
     * 查询详情
     *
     * @param trdId
     * @return
     */
    TReturnDataVo queryReturnDataDetail(@Param("trdId") String trdId);

    /**
     * 批量删除
     *
     * @param trdIdList
     * @return
     */
    int deleteByTrdIdList(@Param("trdIdList") List<String> trdIdList);

    /**
     * 通过idList查询
     *
     * @param trdIdList
     * @return
     */
    List<TReturnData> queryByTrdIdList(@Param("trdIdList") List<String> trdIdList);

    /**
     * 批量更细状态
     *
     * @param trdIdList
     * @param loadStatus
     * @return
     */
    int updateLoadStatusByTrdIdList(@Param("trdIdList") List<String> trdIdList,
        @Param("loadStatus") Integer loadStatus);

    /**
     * 查询所有插件
     *
     * @return
     */
    List<TReturnDataVo> selectAll();
}
